

package com.crbim.modules.config;

import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Swagger配置
 *
 *
 */
@Configuration
public class MySwaggerConfig {

    @Bean
    public GroupedOpenApi modulesApi() {
        String[] paths = {"/**"};
        String[] packagedToMatch = {"com.crbim.modules"};  //包路径
        return GroupedOpenApi.builder().group("demoApi")   //组名
                .pathsToMatch(paths)
                .packagesToScan(packagedToMatch).build();
    }
}